package cn.lovelysia.ymcc.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PhoneRegisterDto {

    @NotNull(message = "图形验证码不能为空")
    private String imageCode;

    @NotNull(message = "手机号码不能为空")
    @Pattern(regexp = "^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$",message = "手机号码格式不正确")
    private String mobile;

    @NotNull(message = "密码不能为空")
    @Size(min = 6,max = 18)
    private String password;
    private Integer regChannel;

    @NotNull(message = "手机短信验证码不能为空")
    private String smsCode;
}
